package com.man.LogicService;

import com.man.bean.AdminMan;
import com.man.dao.AdminDao;

public class loginService {
    public static String authenticateUser(String name, String password, String pow) {
        AdminMan adminman = new AdminMan(name, password, pow);
        if(name.equals("")){
            return "用户名不能为空";
        } else if (password.equals("")) {
            return "密码不能为空";
        }
        int num = new AdminDao().showAdmin(adminman);
        if(num == 0){
            return "查无此人";
        }
        return "登陆成功";
    }
}
